__label__YES "copter: two stage battery failsafe, force land on critical low voltage"
__label__YES "this added failsafe parameter will enable a copter to land at a specified voltage."
__label__YES "in case that the copter is in rtl, but still too far away from home and might not make it to home."
__label__YES "copter: compensate for changing air pressure during longer flights"
__label__NO "our current altitude control logic for althold, loiter, poshold and auto only relies on baro readings."
__label__NO "the air pressure can change quite rapidly, espcially when thermal activity is present."
__label__YES "this can easily result in an altitude error of > m for an one hour mission."
__label__YES "the resulting problems are obvious, from inadvertent entry into forbidden airspace to crashes during auto-land/rtl."
__label__YES ">i would like to suggest adding a slow compensation for changing air pressure by adding small offsets obtained obtained from gps altitude, after heavy low pass filtering and glitch rejection."
__label__NO "this offset correction should be limited to phases of flight with constant altitude (e.g. auto or loiter sections without changing altitude demands)."
__label__NO ">the attached log shows the effect for a rather short section of flight."
__label__NO "an error of almost meters was present after only minutes of constant-altitude auto flight."
__label__YES "if an rtl would have happened at this time, it probably would have descended into ground without slowing down early enough."
__label__NO >![alt](
__label__YES "copter: continue in land mode on failsafe event"
__label__NO "adds new copter parameter `fs_land_continue` to enable/disable this feature."
__label__YES ">if `fs_land_continue` is set for (enabled) and the copter is in _land mode_ when radio, battery, or gcs failsafe activates, copter will continue to land."
__label__NO "if set for , copter will carry out the failsafe action as usual."
__label__NO ">the logic behind this is that if the vehicle is already in land mode, the operator has already positively decided to land at the given location."
__label__YES "if a radio, gcs, or battery failsafe event happens _during that landing_, the vehicle should continue with the landing rather than carrying out the failsafe action."
__label__YES "continuing to land gets the vehicle safely on the ground immediately."
__label__YES "whereas the full failsafe action, if set for rtl, at that point would just waste time and battery."
__label__YES "the less time the vehicle spends in the air during a failsafe condition, the better."
__label__NO "and if it's already trying to land, we might as well let it do that."
__label__NO ">this was recently raised in"
__label__NO ">_description updated --_"
__label__YES "ap_airspeed: fixed timing errors in ms driver"
__label__YES "this fixes #, where we could read from the ms sensor too soon after requesting data and the result coming back would be garbage i could reproduce the issue by deliberately reading from the sensor too fast"
__label__YES "ap_avoidance: minimum altitude for ads-b avoidance"
__label__NO "created a new parameter in the ap_avoidance library called `avd_f_alt_min`."
__label__YES "this allows the operator to inhibit ads-b avoidance below the specified altitude."
__label__YES "the default of is no minimum and avoidance will always happen at any altitude."
__label__YES "if an altitude is specified and the vehicle is below that altitude, the avoidance will be bypassed."
__label__YES ">the primary purpose of this is to prevent ads-b avoidance from kicking in while the vehicle is below the tree line, around structures, or indoors."
__label__YES "taking unnecessary evasive action and crashing into trees or buildings is obviously undesirable and unsafe."
__label__NO ">for example, i would set mine for cm (~ft)."
__label__NO "anything below that is below the tree canopy."
__label__YES "the vehicle will therefore not try to evade manned aircraft that are obviously above the trees but flying low enough to be within the vertical avoidance bubble."
__label__YES ">imo, the existing behavior was a significant safety risk to the vehicle and surrounding people or obstacles."
__label__YES "or it forced the operator make the vertical avoidance bubble very small."
__label__NO "this rectifies that."
__label__YES "with this, i can keep a good sized vertical avoidance bubble without worry about a low flying medivac helicopter sending the copter into the side of the house."
__label__YES "copter: land initiated from a failsafe should hold alt for sec, also recover if failsafe clears"
__label__YES "anytime the code sees a problem and initiates land mode it instead goes in alt hold for seconds."
__label__NO "if the problem has gone away continue in whatever mode it was in."
__label__NO "if the problem persists then lands."
__label__YES "copter: allow pilot to forcibly retake control from gcs with tx"
__label__YES "if someone is flying with a joystick or gcs's virtual sticks, it would be good to allow the pilot to forcibly retake control from the gcs by flicking a switch (flight mode?"
__label__NO "ch/ch?) on the tx."
__label__YES "it's possible at the moment for the gcs to release control by setting all overrides to zero and even disconnecting the gcs from the radio should cause a gcs failsafe and result in the controls going back to the transmitter but these are slightly rough solutions."
__label__YES ">when something goes wrong, it would probably be best for the pilot to be able to reach for the tx, click a switch and be back in control."
__label__YES "rover: allow smartrtl to be used as failsafe action"
__label__NO "the equivalent issue for copter is here:"
__label__NO ">rover offers rtl as an option for it's limited number of [failsafes]("
__label__YES ">we should offer smartrtl as an option as well but, similar to copter, we should allow the user to specify what to do if smartrtl is not available (i.e. the path was too long and smartrtl has been de-activated)."
__label__NO "the two options are ""rtl"" or ""hold"" so perhaps we need two new failsafe behaviour , ""smartrtl or rtl"" and ""smartrtl or hold""."
__label__YES "copter: allow smartrtl to be used as a failsafe action"
__label__NO "at the moment we offer rtl as an option for many [failsafes]( including battery, radio/rc/throttle and gcs failsafe."
__label__NO ">we should offer smartrtl as an option as well."
__label__YES "one thing we need to be careful of though is what we do if smartrtl is not available (i.e. the path was too long and smartrtl has been de-activated)."
__label__NO "there are basically two options - attempt to do regular rtl or land."
__label__NO "so when the options are added to the failsafes, we should probably add two new options, ""smartrtl or rtl"" and ""smartrtl or land""."
__label__YES "copter: remove battery failsafe exeption for auto mode"
__label__YES "copter's battery failsafe feature has an exception for auto mode."
__label__YES "even if the user has set the fs_batt_enable parameter to ""land"", if the vehicle is in auto, it will always rtl."
__label__NO >
__label__NO ">i can't imagine why this exception is required."
__label__NO "i think it's more likely that a user would be confused why the vehicle does not do what it has apparently been configured to do."
__label__YES ">i suspect this exception is a relic from a time when copter's failsafe response could not be configured for each failsafe types (i.e. rc/transmitter and battery failsafes responses were combined in a single parameter)."
__label__YES "certainly for the rc/transmitter failsafe we need special handling while in auto mode because users sometimes want to configure the vehicle to continue with the mission because they plan for it to fly outside of rc/transmitter range."
__label__NO "this is not the case for the battery failsafe however."
__label__YES "add detection of airspeed blockage and switch to non-airspeed control"
__label__YES "cope with water droplet blocking pitot"
__label__YES "ac_attitudecontrol: prevent dcm fallback from triggering a flyaway"
__label__YES "plane can fallback to dcm, which will cause `_ahrs.getlastposdownreset(alt_shift);` to return and not fill in alt_shift."
__label__NO "if the vehicle started with the ekf the comparison for `reset_ms != _ekf_z_reset_ms` passes and we dereference `alt_shift` even though it's garbage on the stack."
__label__NO "simplest fix is to special case that returning (which is what happens when an ahrs doesn't implement the method) is invalid."
__label__NO ">this really indicates however that we should not be using timestamps, as the uint_t will eventually overflow."
__label__NO ">large thanks to clang's static analysis for finding this."
__label__NO "ap_inertialsensor: fix a divide by"
__label__NO "_fifo_downsample_rate was a integer so it's doing integer math here."
__label__NO "when it was set to this always results in a divide by ."
__label__NO ">spotted by coverity, cid"
__label__NO "copter: add ""report-only"" to fs_batt_enable parameter values"
__label__YES "setting fs_batt_enable does not completely disable checking of the battery voltage and capacity."
__label__YES "when the batt goes below the fs_batt_voltage or fs_batt_mah the autopilot won't take control but it still will report the low volt or capacity to the user via leds, buzzer, message to gcs and message in dataflash log."
__label__YES ">to be more consistent with other failsafe, fs_batt_enable = should probably completely disable the checking."
__label__NO "to take the place of the current default behaviour we should add a new ""report only"" option."
__label__NO "nicer handling of errors in rc.apm"
__label__NO "if a fatal error occurs in rc.apm then write the error msg to usb in a loop so that the user has some way of telling what is wrong"
__label__NO "change behavior of brd_safetyenable ="
__label__NO "change behavior of brd_safetyenable = (disable) so that it is actually disabled."
__label__YES "right now it means to boot in a disabled state but if it is connected it can still change the arming state."
__label__NO ">new behavior: (disabled) means button input is ignored."
__label__NO "truely disabled/ignored.."
__label__YES "plane: fc sets safety_disarmed while *in flight*"
__label__YES "#### issue details while in auto flight, our quadplane suddenly decided to go into safety_disarmed, which immediately resulted in all outputs to motors being shut off."
__label__YES "this brought the plane down."
__label__NO "><img width="""" alt=""screen shot -- at pm"" src="""
__label__NO ">#### version ..-beta"
__label__NO ">#### platform [ ] all [ ] antennatracker [ ] copter [x] plane [ ] rover [ ] submarine"
__label__NO ">#### airframe type octaquadplane"
__label__NO ">#### hardware type ph."
__label__NO ">#### logs df log (mb):"
__label__YES "copter: two stage battery failsafe"
__label__YES "it would be useful for pilots who fly long distances to have a two stage battery failsafe, with separate voltage/mah settings for each."
__label__YES "for example if i was flying km away and the first battery failsafe kicked in then if it was set to a fairly low voltage, say v (s), then it may not be able to complete the rtl (not sure exactly what would happen in the case, potentially fall out of the sky)."
__label__YES ">with a two stage battery failsafe, if the multirotor was returning home and hit the second failsafe then it could land for example."
__label__YES "allow battery failsafe to work on either/both batt sources"
__label__YES "this will allow taking advantage of batt and batt voltage and current souces to trigger failsafe mechanisms."
__label__NO "good for redundant power system."
__label__YES "prevent arming while attempting to force the safety switch"
__label__YES "there is an edge case where forcing the safety switch state can fail for an extended period of time, and then succeed."
__label__YES "it's possible that the success can happen while in flight, and effectively forces the safety switch to on, when it should have been off."
__label__YES "this adds a forced arming check that users can not opt out of to prevent it."
__label__NO "move mavlink reboot up to base class"
__label__NO "solved a bug for sub only; making the code common means everybody can benefit from this sort of fix."
__label__NO ">however, the different vehicles currently have several things different between them: - sub and copter both poked ap_notify that a reboot was occurring."
__label__YES "no harm in the other vehicles also getting that behaviour - plane pokes pxio to disable the mixers."
__label__NO "i've assumed that that is still only relevant for plane and controlled it with a boolean ""should"" callback."
__label__NO "- sub had some interesting code which iterated through all of the outputs (badly; should be using _servo_count or similar in rcoutput, not num_rc_channels!) - i've retained this, also protected by a callback."
__label__NO ">we need to work out what everybody should be doing here."
__label__NO "should all vehicles be doing the same thing when rebooting in terms of mixing and sub's ""no short pwm signal"" code?"
__label__YES ">if these should be the same on every vehicle, should we have a call on ap_hal to do this ""reboot safing""?"
__label__NO "possibly `ap_hal::reboot` would call that?"
__label__YES "at the moment a cli reboot won't do any of these ""safing"" procedures, so a reboot in the middle of a motor-test might do interesting things..."
__label__YES "copter: head to home using compass when gps fails"
__label__YES "i would like to propose if possible to have a failsafe kind option during a mission or rtl mode..."
__label__YES "i almost got to loose my quad today as the gps stopped during flight..."
__label__YES "probably it switched to stabilize but i had strong wind and the quad was going away!..."
__label__YES "so i wonder what about if the gps stops or loosing fix, instead of stabilize, use the last value of heading to home (gps) and use the compass to put that heading and starting to travel there..."
__label__NO "of course it won't stop anywhere but all i want is to come near to me so i take control as soon as i have its orientation visible..."
__label__NO ">thanks in advance!"
__label__YES "quadplane: don't send trim values to vtol motors"
__label__NO "plane (and tracker, although it's not a safety issue there), were calling the `output_trim_all()` function."
__label__YES "unfortunately this results in emitting the channels trim value on motor outputs."
__label__YES "if you have the safety disabled this will result in motors spinning during initial boot (with the initial values)."
__label__NO ">in the following screenshot channel , , are motor outputs, channel is the forward motor, channel and are tied to auxiliary pins used as gpio."
__label__NO "(channel goes low before calling `boardconfig.init_safety()` channel goes low when it returns) ![untitled ]("
__label__NO "> channel is going to . ms pulses which is the trim value on that channel."
__label__NO "with the patch applied rebooting instead looks like this (channel and channel are debug and were removed): ![untitled]("
__label__YES ">there is also a safety bug where if the fmu fails the io processor will configured to emit trim values, which on quadplanes are quite unsafe as well."
__label__YES "this takes the approach of not configuring them, which brings plane into symmetry with copter on handling the vtol motors."
__label__NO "(only applies to px builds since chibios does not provide a failsafe setup yet)"
__label__NO ">finally based on a conversation with @rmackay and a weak understanding of copters code i can't see a particular reason for us to need to set the trim values when we will shift into normal generated values shortly anyways."
__label__YES "we can limit this to only trim the non vtol surfaces as well, but as randy pointed out the current behavior would cause you to moved something like landing gear on boot immediately, which isn't good either."
__label__NO ">all testing thus far has been based on a cube + px/fmuv builds."
__label__NO "brd_safetyoption overrides brd_safetyenable"
__label__NO "tested with copter .., . and master."
__label__YES "if brd_safetyenable is set to zero (disabled) the brd_safetyoption being set to (default) overrides the disabling of the safety switch."
__label__YES "this still causes an in-flight disarm if if the switch signal is pulled to ground, no matter what causes it."
__label__NO ">the logic should be that if brd_safetyenable = the brd_safetyoption setting should not apply."
__label__NO "brd_safetyoption should only apply if brd_safetyenable ="
__label__NO ">referencing this issue posted by @pedalspaddles #"
__label__NO "chibios not respecting brd_safetyenable intermittently"
__label__YES "### bug report **issue details** pre-arm and arming check of safety switch intermittently fails even with parameter `brd_safetyenable` disabled on initial power up and never clears until reboot."
__label__NO "this never happened in nuttx, and i've experienced this on multiple occasions in chibios (master and .-rcx)."
__label__NO "rebooting clears the problem until it happens again, seemingly at random."
__label__NO ">i can see that the switch handling is a little different in chibios than nuttx."
__label__NO "something seems to be sneaking by once in a while on initial power up."
__label__NO "i don't have disarmed logging enabled, but i don't think there's anything in the df log that would related to this?"
__label__NO ">@rmackay for fyi."
__label__NO "i experience this in copter, but i don't think it's a copter issue since the copter code just gets its information from board libraries."
__label__NO ">**version** copter . and . master"
__label__NO ">**platform** [ ] all [ ] antennatracker [x] copter [ ] plane [ ] rover [ ] submarine"
__label__NO ">**hardware type** cube"
__label__NO "ap_hal_chibios: fix safety switch option handling"
__label__NO "this resolves an [issue raised by sergey in this copter-.. beta testing discussion]("
__label__NO ">this fix was made after discussing with @tridge and i've also tested on a pixracer these options:"
__label__YES ">brd_safetyoption = : was able to arm the safety switch but never disarm brd_safetyoption = : was able to arm and disarm the safety switch but only while the vehicle was disarmed brd_safetyoption = : was always able to arm and disarm the safety switch"
__label__YES "copter: ensure hexacopter with failed motor can make safe landing"
__label__NO hello,
__label__NO ">i would like to know the apm response in fornt of an engine failure."
__label__YES "as far as i knew, while flying an hexa/octo, the apm should be able to ensure the safety of the platform."
__label__YES "however, last days, during one of my tests, i tried to fly (automatic) an hexa-rotor with one engine failure and the platform fell down ( feets) with any sign of apm response."
__label__NO ">then, once i arrived to this point, the theory that i was using an hexacopter to ensure the safety due tu redundancy is not working anymore."
__label__NO ">this is the main reason why i am writing this post."
__label__YES "which is the best way to ensure safety infront of an engine failure in flight?"
__label__NO "apm code is designed to confront this kind of situations?"
__label__NO ">which is better: - octocopter?"
__label__NO "- coaxial copters (quad,hexa,octo)..."
__label__YES "rover: shorten radio and gcs failsafe timeouts"
__label__NO "this pr improves the rover failsafe in a few ways brought up in this issue"
__label__YES ">- reduce default failsafe timeouts for radio and gcs failsafes."
__label__NO "note the timeout for each includes a hardcoded or seconds plus the value held in fs_timeout meaning the real default timeouts are: - radio/throttle failsafe default timeout = .sec (sec + fs_timeout) - gcs failsafe default timeout = . sec (sec + fs_timeout) - gcs failsafe will not trigger if rc_override or manual_control messages are arriving."
__label__NO "this helps reduce false positives when a joystick is being used which may use up much of the bandwidth and lead to heartbeat messages arriving more slowly than hz."
__label__NO "- non-functional parameter description updates, renamed a function, moved a variable to a structure, etc"
__label__NO ">this pr does not attempt to solve all the problems in the rover failsafe code."
__label__NO "it's just some small improvements that came out of an investigation into [this mission planner issue]("
__label__YES "copter: hexacopter motor failure redundancy improvement"
__label__YES "this is a change from @lthall to heuristically detect and then compensate for the loss of a motor on vehicles with at least six motors (hexacopter, octacopter, octaquad, dodecahexacopter)."
__label__NO ">@lthall is probably best placed to explain the changes but my understanding is:"
